-
Notifications
You must be signed in to change notification settings - Fork 126
Update Ad4630 class and improve example #691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update Ad4630 class and improve example #691
Conversation
tfcollins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide a context file for emulation testing?
|
|
||
| @property | ||
| def sample_averaging(self): | ||
| """Get the sample averaging. Only available in 30bit averaged mode.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the docstring and property name still correct? Does this apply to all supported parts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tfcollins
All parts are supported by the same drivers both in Linux and No-OS.
The IIO ABI used for controlling the sample averaging is oversampling_ratio. That applies to all supported parts.
The docstring abstracts the oversampling_ratio interface and presents it to users in terms of data sheet nomenclature (which is sample averaging). Should we update the docstrigs to match the underlying interfaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you be more descriptive on what this means. sample_averaging seems to be a boolean but oversampling_ratio would be an integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| @property | ||
| def sample_averaging_avail(self): | ||
| """Get list of all the sample averaging values available. Only available in 30bit averaged mode.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as below comment
| "ad4630-16", | ||
| "ad4630-24", | ||
| "ad4632-16", | ||
| "ad4632-24", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update supported parts MD
AD4632-16 and AD4632-24 are now support in Linux. Add AD4632-16 and AD4632-24 to the list of supported/compatible parts. Also add those to the list of supported parts. Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Use python argparse [1] to handle command-line arguments thus making the example more flexible with respect to its input arguments. This also extends the example to work with other ADCs that belong to the AD4000 series by enabling a device argument and using it to instantiate the correct ADC object. [1]: https://docs.python.org/3/library/argparse.html Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
In Linux, sample averaging for AD4630 and similar ADCs is supported through oversampling ratio attributes. Use the supported interfaces to handle sample averaging. Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Add label to AD4630 plot axes to make it easier to understand data. Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Add ADAQ4216 context file for emulation testing. Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
1a16f30 to
d74a7c7
Compare
|
Change log v1 -> v2:
|
Description
Update AD4630 pyadi-iio class to support AD4632-16/32 and to use supported Linux kernel interfaces for AD4630 and similar ADCs.
Also, update AD4630 example to use argparse, making the example more flexible with respect to command-line arguments.
Type of change
Please delete options that are not relevant.
How has this been tested?
Tested with ADAQ4216 remote setup.
Test Configuration:
Hardware: ADAQ4216
OS: Linux kernel 6.17-rc3
Documentation
No documentation changes are needed.
Checklist: